<template>
  <div id="home-swipe">
    <van-swipe class="my-swipe" :autoplay="3000" indicator-color="white" :show-indicators="false">
      <van-swipe-item v-for="(item,index) in imgList" :key="index">
        <img :src="item" alt="">
      </van-swipe-item>
    </van-swipe>
  </div>
</template>

<script>
import Vue from 'vue';
import { Swipe, SwipeItem } from 'vant';
import "vant/lib/swipe/style"
import "vant/lib/swipe-item/style"

Vue.use(Swipe);
Vue.use(SwipeItem);
export default {
  name:"HomeSwipe",
  data() {
    return {
      imgList:[
        "http://120.53.31.103:84/uploads/image/2021-09-08/zP1osWNNxyfKSX1Dt6IDUUh5Vpz8AxD39BBaQECW.jpeg",
        "http://120.53.31.103:84/uploads/image/2021-09-08/pihYvxiYLTL5XCVs0sMFzlvY2TfSUj95Tz0IWjgF.jpeg",
        "http://120.53.31.103:84/uploads/image/2021-09-08/lXEERcH4CIb3reka5yruT7RW7jMD4K7vreK6utgq.jpeg"
      ]
    }
  },
  created() {
    this.$http({
      url:"/api/app/banner",
      methods:"get"
    }).then(res=>{
      // console.log(res);
    })
  },
}
</script>

<style scoped>
  img{
    width: 100%;
  }
</style>